# -*- coding:utf-8 -*-
# @Time:2024/4/1921:01
# @Author:miuzg
# @FileName:new test2.py
# @Software:PyCharm
from typing import List
class Solution:
    def countCompleteDayPairs(self, hours: List[int]) -> int:
        H = 24
        ans = 0
        cnt = [0] * H
        for hour in hours:
            ans += cnt[(H - hour % H) % H]
            cnt[hour % H] += 1
            print('ans=',ans,'\ncnt=',cnt)
        return ans
hours = [12,12,30,24,24]
solution = Solution()
ans = solution.countCompleteDayPairs(hours)
print('final_ans=',ans)